package com.example.petplatform.dao;

import com.example.petplatform.dto.DonationQueryDTO;
import com.example.petplatform.entity.Donation;
import com.example.petplatform.entity.Param.Params;
import com.example.petplatform.vo.DonationStatisticsVO;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface DonationDao extends Mapper<Donation> {
    // 分页查询
    List<Donation> donationSearch(Params params);

    // 根据ID查询
    Donation selectById(@Param("id") Long id);

    // 更新
    int updateById(Donation donation);

    // 插入
    int insert(Donation donation);

    // 统计数据
    DonationStatisticsVO selectStatistics();
}
